﻿using System;
using System.Windows.Forms;

namespace FileTracker
{
    public class MainApplicationContext:ApplicationContext
    {
        private MainController _controller;

        public MainApplicationContext()
        {
            //This is where the WCF service will be started.

            Application.ApplicationExit += Application_ApplicationExit;

            _controller = new MainController();
            _controller.Exit += Application_ApplicationExit;

            _controller.Start();
        }

        private void Application_ApplicationExit(object argSender, EventArgs argEventArgs)
        {
            //Not really anything to do in this method
            ExitThread();
        }
    }
}
